import request from '@/utils/request'

export default {
  //行业资讯
  operationList(data) {
    return request({
      url: '/news/page',
      method: 'post',
      data
    })
  },
  //行业资讯详情
  operationDetail(id) {
    return request({
      url: `/news/${id}`,
      method: 'GET',
      
    })
  },
  addOperation(data) {
    return request({
      url: '/news/add',
      method: 'post',
      data
    })
  },
  editOperation(data) {
    return request({
      url: `/news/${data.id}`,
      method: 'post',
      data
    })
  },
  auditClick(data){
    return request({
        url: `/news/verify/${data.id}/${data.status}`,
        method: 'post',
      })
  },
  auditfail(id){
    return request({
        url: `/news/verify/${id}/false`,
        method: 'post',
      })
  },
  statusUsi(id) {
    return request({
      url: `/news/enable/${id}/true`,
      method: 'post',
    })
  },
  statusUsiForbidden(id) {
    return request({
      url: `/news/enable/${id}/false`,
      method: 'post',
    })
  },

   //banner
   bannerList(data) {
    return request({
      url: '/banner/list',
      method: 'post',
      data
    })
  },
  addBanner(data) {
    return request({
      url: '/banner',
      method: 'post',
      data
    })
  },
  editBanner(data) {
    return request({
      url: '/banner',
      method: 'put',
      data
    })
  },
  statusForbidden(id,status) {
    return request({
      url: `/banner/${id}/status/${status}`,
      method: 'post',
    })
  },
  searchList(data) {
    return request({
      url: '/hot_search/list',
      method: 'post',
      data
    })
  },
  delHot(data) {
    return request({
      url: '/hot_search/del',
      method: 'post',
      data
    })
  },
  editCount(data) {
    return request({
      url: '/hot_search/editCount',
      method: 'post',
      data
    })
  },

}
